//: shui 2015-05-23 for JBT defines
typedef signed   char   int8;
typedef unsigned char   uint8;

typedef signed   short  int16;
typedef unsigned short  uint16;
								   
typedef signed   long   int32;
typedef unsigned long   uint32;

//typedef unsigned char   bool;

typedef uint8 osalSnvId_t;
typedef uint8 osalSnvLen_t;

#define JBT_DEBUG_LOG    (1)
#if JBT_DEBUG_LOG 
extern  void debug_log(const char *fmt,...) ;
#else
 #define debug_log(fmt,...)
#endif

//: will enable certification and time check
#define COMPILE_FOR_TEST_LIB  (0)
     #define TEST_VALID_DATA     (10)
 				
#define JBT_FwVerNum  "00.01 ("  __DATE__ " "  __TIME__")" 

#define JBT_CH_CLOUD     (1)

//: include OTA, factory settings, special test functions
#define JBT_WIFI_FUNC         (1)
#define JBT_FACTORY_FUNC  (1)
#define JBT_THREAD_CREATE  (1)

#define JBT_OTA_STM32         (1)
        #define OTA_FLAG_NULL       (0)
        #define OTA_FLAG_NL6621   (1)
        #define OTA_FLAG_STM32    (2)

#define JBT_RESET_DIRECTCFG   (1)
#define JBT_SOFTAP_SETTING   (1)

#define JBT_UART_FUNC    (1)
#if  JBT_UART_FUNC
    #define JBT_UART_BUFFERED   (0)
    #define JBT_UART_LOG              (1)
    #define JBT_UART_AT_CMD        (1)
    //: only AT mode  //: will identif 0xEE 0xEE 	0xEE 0xEE  for STM32 upgrade only
    #define JBT_UART_AT_NO_DATA        (1)	
    #define JBT_UART_WIFI_DATA  (1)
    #define JBT_UART_WIFI_LOG    (1)
	#define JBT_UART_WIFI_LOG_CMD  (1)
#endif

#define JBT_LED                 (0)
#define JBT_OTA                (0)

#define JBT_STACK_ARRANGE  (1)

#define JBT_UART_CMD     (1)
    #define JBT_UART_SYNC  (0xEE)

#define JBT_BROAD_CAST  (1)
  
#define JTAG_DEBUG          (0)
#define JBT_FLASH_PARA  (1)
//: only define 2 ID for simple
#define PARA_CONFIG_PARA_ID  (1)
#define PARA_USER_PARA_ID  (2)

#define FUNC_SUCCEED (0)
#define FUNC_FAIL        (255)

#define SNV_SUCCEED  (0)
#define SNV_FAIL  (255) 

extern int8  wifi_linked_up;
extern struct sys_status_t sys_status;;

extern  int  jbt_snv_write( int id, int len, void *pBuf );
extern  int  jbt_snv_read( int id, int len, void *pBuf );
extern void JBT_WiFiAppMain(void * pParam);
extern void put_data_to_uart_send_buff(uint8 *data,uint16 len);
extern void byte_to_str(uint8 *data,uint8 len, uint8 max_len, char *str);

